using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;

namespace MoEngine
{
    public class Scene
    {
        protected SceneNode m_RootNode;

        public SceneNode Root
        {
            get { return m_RootNode; }
        }

        protected Camera m_Camera;

        public Camera Camera
        {
            get { return m_Camera; }
            set { m_Camera = value; }
        }

        protected Clock m_Clock;

        public Scene()
        {
            m_RootNode = new SceneNode();
            m_RootNode.Scene = this;
        }

        public void Update()
        {
            m_RootNode.Update();
        }

        public void Render()
        {
            System.Diagnostics.Debug.Assert(
                Camera != null, "Cannot render scene without defined Camera");

            m_RootNode.Render();
        }
    }
}
